/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/20.
	 */
	var RingProgress = __webpack_require__(23);
	var Root = React.createClass({displayName: "Root",
	    render:function(){
	        return(
	            React.createElement("div", null, 
	                React.createElement(RingProgress, null), 
	                React.createElement(RingProgress, {value: "30", color: ["#ccc", "#000", "yellow"]}), 
	                React.createElement(RingProgress, {value: "100"})
	            )

	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null),document.getElementById('main'));

/***/ },

/***/ 23:
/***/ function(module, exports) {

	/**
	 * Created by Administrator on 2017/3/20.
	 */
	var RingProgress = React.createClass({displayName: "RingProgress",
	    getDefaultProps: function () {
	        return {
	            radius: 100, //半径
	            border: 10, //边框
	            color: ["#ccc", "#000", "#f00"], //颜色，背影色，过渡色，最终色
	            speed: 1000,//速度
	            value: 0
	        }
	    },
	    componentDidMount: function () {
	        this._drawCircle();
	    },
	    _drawCircle: function () {
	        var id = this.refs.ucsRingProgress;
	        var opt = {
	            r: this.props.radius, //半径
	            b: this.props.border, //边框
	            color: this.props.color, //颜色，背影色，过渡色，最终色
	            speed: this.props.speed,//速度
	            perentvalue: this.props.value
	        };
	        if (!isNaN(opt.perentvalue)) {
	            var r = Raphael(id, 2 * opt.r, 2 * opt.r), R = opt.r - (opt.b / 2);
	        }
	        r.customAttributes.arc = function (value, R) {
	            if (value == 100) {
	                value = 99.999
	            }
	            var alpha = 3.6 * value, a = (90 - alpha) * Math.PI / 180, x = opt.r + R * Math.cos(a), y = opt.r - R * Math.sin(a), path;
	            path = [["M", opt.r, opt.r - R], ["A", R, R, 0, +(alpha > 180), 1, x, y]];
	            return {path: path}
	        };
	        r.path().attr({stroke: opt.color[0], "stroke-width": opt.b}).attr({arc: [100, R]});
	        if (opt.perentvalue > 0) {
	            var c = r.path().attr({
	                stroke: opt.color[1],
	                "stroke-width": opt.b,
	                "stroke-linecap": "round"
	            }).attr({arc: [0.01, R]});
	            setTimeout(function () {
	                c.animate({stroke: opt.color[2], arc: [opt.perentvalue, R]}, opt.speed)
	            })
	        }
	    },
	    render: function () {
	        return (
	            React.createElement("div", {className: "ucs-ring-progress", ref: "ucsRingProgress"})
	        )
	    }
	});
	module.exports = RingProgress;

/***/ }

/******/ });